MIPS: Loongson 3: Add Loongson LS3A RS780E 1-way machine definition
authorAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Jul 2014 17:16:31 +0000 (19:16 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 13 Feb 2020 05:14:49 +0000 (05:14 +0000)
Forwarded: no

Add a Loongson LS3A RS780E 1-way machine definition, which only differs
from other Loongson 3 based machines by the UART base clock speed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
[bwh: Forward-ported to 4.2]

Gbp-Pq: Topic features/mips
Gbp-Pq: Name MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch

arch/mips/include/asm/bootinfo.h
arch/mips/loongson64/common/machtype.c
arch/mips/loongson64/common/serial.c
arch/mips/loongson64/common/uart_base.c

index 34d62229dea5ab8ad93a037b7bfde94630747056..d5f211f2abb250b4587f85ceff3619bbcc6e4841 100644 (file)
@@ -71,6 +71,7 @@ enum loongson_machine_type {
        MACH_LEMOTE_NAS,
        MACH_LEMOTE_LL2F,
        MACH_LOONGSON_GENERIC,
+       MACH_LOONGSON_3A780E1W,
        MACH_LOONGSON_END
 };
 
index 4e42d929f1c7a4c745d5081898b4fb6714701ef1..d2df359ca6bd11f44ce71db0e98ecec15605a0e9 100644 (file)
@@ -24,6 +24,7 @@ static const char *system_types[] = {
        [MACH_LEMOTE_NAS]       = "lemote-nas-2f",
        [MACH_LEMOTE_LL2F]      = "lemote-lynloong-2f",
        [MACH_LOONGSON_GENERIC] = "generic-loongson-machine",
+       [MACH_LOONGSON_3A780E1W] = "loongson-ls3a-rs780e-1w",
        [MACH_LOONGSON_END]     = NULL,
 };
 
index 98c3a7feb10f8b2391c968661e5e76c8d6c2770e..a757da6a6dd33965e82b3fd92f221ba56b61a901 100644 (file)
@@ -48,6 +48,7 @@ static struct plat_serial8250_port uart8250_data[][MAX_UARTS + 1] = {
        [MACH_LEMOTE_NAS]       = {PORT_M(3, 3686400), {} },
        [MACH_LEMOTE_LL2F]      = {PORT(3, 1843200), {} },
        [MACH_LOONGSON_GENERIC] = {PORT_M(2, 25000000), {} },
+       [MACH_LOONGSON_3A780E1W] = {PORT_M(2, 33177600), {} },
        [MACH_LOONGSON_END]     = {},
 };
 
index e88d937f10fea92eba802974079828125ce369b2..95f20e4f6fb1b3f87841eb2daee24a322a4ad4d4 100644 (file)
@@ -21,6 +21,7 @@ void prom_init_loongson_uart_base(void)
 {
        switch (mips_machtype) {
        case MACH_LOONGSON_GENERIC:
+       case MACH_LOONGSON_3A780E1W:
                /* The CPU provided serial port (CPU) */
                loongson_uart_base[0] = LOONGSON_REG_BASE + 0x1e0;
                break;